import java.lang.reflect.Array;
import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            int a=1;
            for (int j = 0; j < 5; j++) {
                if(i!=0&&a==1){
                    for (int k = 0; k < 3 * i; k++) {
                        System.out.print(" ");
                    }
                }
                    a=-1;
                    System.out.print("*"+"  ");
            }
            System.out.println();
        }
    }
    public static void main8(String[] args) {
        int[][] array={{91,25,8},{56,14,2},{47,3,67}};
        for (int i = 0; i < 2; i++) {
            for (int j=i+1;j<3;j++){
                int tmp=array[i][j];
                array[i][j]=array[j][i];
                array[j][i]=tmp;
            }
        }
        for (int i = 0; i < 3; i++) {
            System.out.println(Arrays.toString(array[i]));

        }
    }
    public static void main7(String[] args) {
        int[] arr={3,5,2,4,8};
        for (int i = 0; i < arr.length; i++) {
            if(i!=arr.length-1) {
                System.out.print(arr[i] + ",");
            }
            else{
                System.out.print(arr[i]);
            }
        }
    }
    public static void main6(String[] args) {
        for (int i = 0; i < 5; i++) {
            int a=1;
            for (int j = 0; j < 5; j++) {
                if(i!=0&&a==1){
                    for(int k=0;k<2*i+1;k++){
                        System.out.print(" ");
                    }
                    a=-1;
                }
                System.out.print("*"+"  ");
            }
            System.out.println();
        }
    }
    public static void main2(String[] args) {


        for (int i = 100; i <=999 ; i++) {
            int m=i;
            int n=1;
            int sum=0;
            while(m/10>0){
                n++;
                m/=10;
            }
            m=i;
            while(m>0){
                sum+=Math.pow(m%10,n);
                m=m/10;
            }
            if(sum==i){
                System.out.print(i+" ");
            }
        }
    }
    public static void main1(String[] args) {
        int n=0;
        int count=0;
        for (int i = 1; i <=100 ; i++) {
            if(i%2==0){
                System.out.print(i+" ");
                count++;
            }
            if(count%5==0){
                System.out.println();
            }
        }
    }
}
